import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
// import About from '../views/About.vue'
import Center from '../views/pages/Center.vue'
import Information from '../views/pages/Information.vue'
import Us from '../views/pages/Us.vue'

Vue.use(VueRouter)

const childenRouter = [{
        path: '/',
        name: 'Information',
        component: Information,
    },
    {
        path: '/Center',
        name: 'Center',
        component: Center,
    },
    {
        path: '/us',
        name: 'Us',
        component: Us,
    },
    // {
    //   path: '/about',
    //   name: 'About',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
            path: '/shouye',
            name: 'shouye ',
            component: Home,
        },
        {
            path: '/',
            name: 'About',
            // route level code-splitting
            // this generates a separate chunk (about.[hash].js) for this route
            // which is lazy-loaded when the route is visited.
            component: () =>
                import ( /* webpackChunkName: "about" */ '../views/About.vue'),
            children: childenRouter
        }
    ]
})

export default router